<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="renderer" content="webkit">
    <title>学生管理系统 - 登录</title>
    <link rel="stylesheet" href="../css/pintuer.css">
    <link rel="stylesheet" href="../css/admin.css">
    <style>
        body {
            background-color: #f2f9fd;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
        }
        .login-box {
            width: 1000px;
            height: 400px;
            padding: 50px;
            background-color: #fff;
            border: 1px solid #ddd;
            border-radius: 10px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            text-align: center;
        }
        .login-header {
            display: flex;
            justify-content: center;
            align-items: center;
            margin-bottom: 20px;
        }
        .login-header img {
            width: 200px; /* 调整图片宽度 */
            margin-right: 20px; /* 调整图片与文字之间的间距 */
        }
        .login-header h2 {
            margin: 0;
            color: #333;
            font-family: 'Arial', sans-serif;
            font-size: 40px; /* 调整字体大小 */
        }
        .login-box input[type="text"], .login-box input[type="password"] {
            width: calc(100% - 20px);
            padding: 10px;
            margin-bottom: 15px;
            border: 1px solid #ccc;
            border-radius: 5px;
            outline: none;
            transition: border-color 0.3s;
        }
        .login-box input[type="text"]:focus, .login-box input[type="password"]:focus {
            border-color: #337ab7;
        }
        .login-box button {
            width: 100%;
            padding: 10px;
            background-color: #337ab7;
            color: #fff;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            transition: background-color 0.3s;
        }
        .login-box button:hover {
            background-color: #286090;
        }
    </style>
</head>
<body>
<div class="login-box">
    <div class="login-header">
        <img src="img.png" alt="Logo">
        <h2>登录</h2>
    </div>
    <form id="loginForm">
        <input type="text" id="username" name="username" placeholder="请输入用户名" required>
        <input type="password" id="password" name="password" placeholder="请输入密码" required>
        <button type="submit">登录</button>
    </form>
</div>

<script>
    document.getElementById('loginForm').addEventListener('submit', function(event) {
        event.preventDefault();
        var username = document.getElementById('username').value;
        var password = document.getElementById('password').value;

        // 在实际应用中，这里需要进行用户名和密码的验证
        // 这里简单示范，如果用户名和密码不为空，则跳转到管理系统页面，否则不执行跳转
        if (username.trim() !== '' && password.trim() !== '') {
            window.location.href = 'index.html'; // 这里跳转到您的主页面，比如 index.html
        } else {
            alert('请输入用户名和密码！');
        }
    });
</script>
</body>
</html>
